package com.dds.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;

import com.dds.demo.config.DynamicDataSourceRegister;
import com.dds.demo.util.SpringContextUtil;

@SpringBootApplication
@Import({DynamicDataSourceRegister.class}) // 注册动态多数据源
public class DynamicDataSourceApplication {

	public static void main(String[] args) {
		 ApplicationContext app =SpringApplication.run(DynamicDataSourceApplication.class, args);
		 SpringContextUtil.setApplicationContext(app);  
	}
}
